<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>计算属性</title>
</head>
<body>
<div id="example">
c = {{ example }}
</div>
<script src="../js/vue.js"></script>
<script>
    var vm = new Vue({
        el: '#example',
        data: {
            a: 1,
            b: 2
        },
        computed: {
            example: {
                cache: false,
                get: function () {
                    return Date.now();
                }
            }
        }
    });
</script>
</body>
</html>